package com.ruoyi.yanjing.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yanjing.mapper.SafetyDocumentLearningMapper;
import com.ruoyi.yanjing.domain.SafetyDocumentLearning;
import com.ruoyi.yanjing.service.ISafetyDocumentLearningService;

/**
 * 安全文件学习信息Service业务层处理
 * 
 * @author whz
 * @date 2024-12-04
 */
@Service
public class SafetyDocumentLearningServiceImpl implements ISafetyDocumentLearningService 
{
    @Autowired
    private SafetyDocumentLearningMapper safetyDocumentLearningMapper;

    /**
     * 查询安全文件学习信息
     * 
     * @param id 安全文件学习信息主键
     * @return 安全文件学习信息
     */
    @Override
    public SafetyDocumentLearning selectSafetyDocumentLearningById(Long id)
    {
        return safetyDocumentLearningMapper.selectSafetyDocumentLearningById(id);
    }

    /**
     * 查询安全文件学习信息列表
     * 
     * @param safetyDocumentLearning 安全文件学习信息
     * @return 安全文件学习信息
     */
    @Override
    public List<SafetyDocumentLearning> selectSafetyDocumentLearningList(SafetyDocumentLearning safetyDocumentLearning)
    {
        return safetyDocumentLearningMapper.selectSafetyDocumentLearningList(safetyDocumentLearning);
    }

    /**
     * 新增安全文件学习信息
     * 
     * @param safetyDocumentLearning 安全文件学习信息
     * @return 结果
     */
    @Override
    public int insertSafetyDocumentLearning(SafetyDocumentLearning safetyDocumentLearning)
    {
        safetyDocumentLearning.setCreateTime(DateUtils.getNowDate());
        return safetyDocumentLearningMapper.insertSafetyDocumentLearning(safetyDocumentLearning);
    }

    /**
     * 修改安全文件学习信息
     * 
     * @param safetyDocumentLearning 安全文件学习信息
     * @return 结果
     */
    @Override
    public int updateSafetyDocumentLearning(SafetyDocumentLearning safetyDocumentLearning)
    {
        safetyDocumentLearning.setUpdateTime(DateUtils.getNowDate());
        return safetyDocumentLearningMapper.updateSafetyDocumentLearning(safetyDocumentLearning);
    }

    /**
     * 批量删除安全文件学习信息
     * 
     * @param ids 需要删除的安全文件学习信息主键
     * @return 结果
     */
    @Override
    public int deleteSafetyDocumentLearningByIds(Long[] ids)
    {
        return safetyDocumentLearningMapper.deleteSafetyDocumentLearningByIds(ids);
    }

    /**
     * 删除安全文件学习信息信息
     * 
     * @param id 安全文件学习信息主键
     * @return 结果
     */
    @Override
    public int deleteSafetyDocumentLearningById(Long id)
    {
        return safetyDocumentLearningMapper.deleteSafetyDocumentLearningById(id);
    }
}
